using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._NetworkDiagramTools._Configuration
{
    /// <summary>
    /// <para>Add Remove Feature Rule</para>
    /// <para>Adds a diagram rule to automatically remove diagram features during diagram building based on an existing template. This rule removes diagram features based on different network source classes and object tables.</para>
    /// <para>添加逻辑示意图规则，用于在基于现有模板构建逻辑示意图时自动移除逻辑示意图要素。此规则将移除基于不同网络源类和对象表的逻辑示意图要素。</para>
    /// </summary>    
    [DisplayName("Add Remove Feature Rule")]
    public class AddRemoveFeatureRule : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public AddRemoveFeatureRule()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_utility_network">
        /// <para>Input Network</para>
        /// <para>The utility network or trace network containing the diagram template to modify.</para>
        /// <para>包含要修改的逻辑示意图模板的公共设施网络或追踪网络。</para>
        /// </param>
        /// <param name="_template_name">
        /// <para>Input Diagram Template</para>
        /// <para>The name of the diagram template to modify.</para>
        /// <para>要修改的逻辑示意图模板的名称。</para>
        /// </param>
        /// <param name="_is_active">
        /// <para>Active</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the rule will be active when generating and updating diagrams based on the specified template.
        ///   <bulletList>
        ///     <bullet_item>Checked—The added rule will become active during the generation and update of any diagrams based on the input template. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—The added rule will not become active during the generation or update of any diagrams based on the input template.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定在基于指定模板生成和更新关系图时，规则是否处于活动状态。
        ///   <bulletList>
        ///     <bullet_item>选中 - 在基于输入模板生成和更新任何逻辑示意图期间，添加的规则将变为活动状态。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>未选中 - 在基于输入模板生成或更新任何逻辑示意图期间，添加的规则将不会变为活动状态。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_source_type">
        /// <para>Source Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the geometry type of the source class or object table to be processed.</para>
        ///   <bulletList>
        ///     <bullet_item>Junctions only—Only junction source classes or object tables (network polygon source classes, network point source classes, or junction object tables) will be processed.</bullet_item><para/>
        ///     <bullet_item>Edges only—Only edge source classes or object tables (network line source classes or edge object tables) will be processed.</bullet_item><para/>
        ///     <bullet_item>Both junctions and edges—Both junction and edge types will be processed. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要处理的源类或对象表的几何类型。</para>
        ///   <bulletList>
        ///     <bullet_item>仅交汇点—仅处理交汇点源类或对象表（网络面源类、网络点源类或交汇点对象表）。</bullet_item><para/>
        ///     <bullet_item>仅边—仅处理边源类或对象表（网络线源类或边对象表）。</bullet_item><para/>
        ///     <bullet_item>交汇点和边 - 将处理交汇点类型和边类型。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_inverse_source_selection">
        /// <para>Rule Process</para>
        /// <para><xdoc>
        ///   <para>Specifies how the specified network source classes and object tables will be processed.</para>
        ///   <bulletList>
        ///     <bullet_item>Exclude source classes—Features and objects based on the specified network source classes and object tables will not be removed, while other features and objects will be removed.</bullet_item><para/>
        ///     <bullet_item>Include source classes—Features and objects based on the specified network source classes and object tables will be removed. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何处理指定的网络源类和对象表。</para>
        ///   <bulletList>
        ///     <bullet_item>排除源类 - 不会移除基于指定网络源类和对象表的要素和对象，而移除其他要素和对象。</bullet_item><para/>
        ///     <bullet_item>包括源类 - 将移除基于指定网络源类和对象表的要素和对象。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_network_source">
        /// <para>Network Sources</para>
        /// <para><xdoc>
        ///   <para>The network source class (or classes) and object table (or tables) that will be excluded or included depending on the rule process.</para>
        ///   <para>By default, Rule Process is set to Include source classes (inverse_source_selection = "INCLUDE_SOURCE_CLASSES" in Python), and one or more network source classes or object tables will be processed. All diagram features related to network features and objects that belong to those classes and object tables will be removed.</para>
        ///   <para>When specifying the SystemJunctions class among the network source classes, the rule will systematically process both system junctions and system junction objects.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>根据规则流程，将排除或包含的网络源类（或多个类）和对象表。</para>
        ///   <para>默认情况下，“规则进程”设置为“包括源类”（Python 中为 inverse_source_selection = “INCLUDE_SOURCE_CLASSES”），并且将处理一个或多个网络源类或对象表。将移除与网络要素和属于这些类和对象表的对象相关的所有逻辑示意图要素。</para>
        ///   <para>在网络源类中指定 SystemJunctions 类时，规则将系统地处理系统联结和系统联结对象。</para>
        /// </xdoc></para>
        /// </param>
        public AddRemoveFeatureRule(object _in_utility_network, object _template_name, _is_active_value _is_active, _source_type_value _source_type, _inverse_source_selection_value _inverse_source_selection, List<object> _network_source)
        {
            this._in_utility_network = _in_utility_network;
            this._template_name = _template_name;
            this._is_active = _is_active;
            this._source_type = _source_type;
            this._inverse_source_selection = _inverse_source_selection;
            this._network_source = _network_source;
        }
        public override string ToolboxName => "Network Diagram Tools";

        public override string ToolName => "Add Remove Feature Rule";

        public override string CallName => "nd.AddRemoveFeatureRule";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_utility_network, _template_name, _is_active.GetGPValue(), _source_type.GetGPValue(), _inverse_source_selection.GetGPValue(), _network_source, _description, _out_utility_network, _out_template_name];

        /// <summary>
        /// <para>Input Network</para>
        /// <para>The utility network or trace network containing the diagram template to modify.</para>
        /// <para>包含要修改的逻辑示意图模板的公共设施网络或追踪网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_utility_network { get; set; }


        /// <summary>
        /// <para>Input Diagram Template</para>
        /// <para>The name of the diagram template to modify.</para>
        /// <para>要修改的逻辑示意图模板的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Diagram Template")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _template_name { get; set; }


        /// <summary>
        /// <para>Active</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the rule will be active when generating and updating diagrams based on the specified template.
        ///   <bulletList>
        ///     <bullet_item>Checked—The added rule will become active during the generation and update of any diagrams based on the input template. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—The added rule will not become active during the generation or update of any diagrams based on the input template.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定在基于指定模板生成和更新关系图时，规则是否处于活动状态。
        ///   <bulletList>
        ///     <bullet_item>选中 - 在基于输入模板生成和更新任何逻辑示意图期间，添加的规则将变为活动状态。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>未选中 - 在基于输入模板生成或更新任何逻辑示意图期间，添加的规则将不会变为活动状态。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Active")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _is_active_value _is_active { get; set; }

        public enum _is_active_value
        {
            /// <summary>
            /// <para>ACTIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ACTIVE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>INACTIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("INACTIVE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Source Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the geometry type of the source class or object table to be processed.</para>
        ///   <bulletList>
        ///     <bullet_item>Junctions only—Only junction source classes or object tables (network polygon source classes, network point source classes, or junction object tables) will be processed.</bullet_item><para/>
        ///     <bullet_item>Edges only—Only edge source classes or object tables (network line source classes or edge object tables) will be processed.</bullet_item><para/>
        ///     <bullet_item>Both junctions and edges—Both junction and edge types will be processed. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要处理的源类或对象表的几何类型。</para>
        ///   <bulletList>
        ///     <bullet_item>仅交汇点—仅处理交汇点源类或对象表（网络面源类、网络点源类或交汇点对象表）。</bullet_item><para/>
        ///     <bullet_item>仅边—仅处理边源类或对象表（网络线源类或边对象表）。</bullet_item><para/>
        ///     <bullet_item>交汇点和边 - 将处理交汇点类型和边类型。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Source Type")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _source_type_value _source_type { get; set; }

        public enum _source_type_value
        {
            /// <summary>
            /// <para>Junctions only</para>
            /// <para>Junctions only—Only junction source classes or object tables (network polygon source classes, network point source classes, or junction object tables) will be processed.</para>
            /// <para>仅交汇点—仅处理交汇点源类或对象表（网络面源类、网络点源类或交汇点对象表）。</para>
            /// </summary>
            [Description("Junctions only")]
            [GPEnumValue("JUNCTIONS")]
            _JUNCTIONS,

            /// <summary>
            /// <para>Edges only</para>
            /// <para>Edges only—Only edge source classes or object tables (network line source classes or edge object tables) will be processed.</para>
            /// <para>仅边—仅处理边源类或对象表（网络线源类或边对象表）。</para>
            /// </summary>
            [Description("Edges only")]
            [GPEnumValue("EDGES")]
            _EDGES,

            /// <summary>
            /// <para>Both junctions and edges</para>
            /// <para>Both junctions and edges—Both junction and edge types will be processed. This is the default.</para>
            /// <para>交汇点和边 - 将处理交汇点类型和边类型。这是默认设置。</para>
            /// </summary>
            [Description("Both junctions and edges")]
            [GPEnumValue("BOTH")]
            _BOTH,

        }

        /// <summary>
        /// <para>Rule Process</para>
        /// <para><xdoc>
        ///   <para>Specifies how the specified network source classes and object tables will be processed.</para>
        ///   <bulletList>
        ///     <bullet_item>Exclude source classes—Features and objects based on the specified network source classes and object tables will not be removed, while other features and objects will be removed.</bullet_item><para/>
        ///     <bullet_item>Include source classes—Features and objects based on the specified network source classes and object tables will be removed. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何处理指定的网络源类和对象表。</para>
        ///   <bulletList>
        ///     <bullet_item>排除源类 - 不会移除基于指定网络源类和对象表的要素和对象，而移除其他要素和对象。</bullet_item><para/>
        ///     <bullet_item>包括源类 - 将移除基于指定网络源类和对象表的要素和对象。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Rule Process")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _inverse_source_selection_value _inverse_source_selection { get; set; }

        public enum _inverse_source_selection_value
        {
            /// <summary>
            /// <para>Exclude source classes</para>
            /// <para>Exclude source classes—Features and objects based on the specified network source classes and object tables will not be removed, while other features and objects will be removed.</para>
            /// <para>排除源类 - 不会移除基于指定网络源类和对象表的要素和对象，而移除其他要素和对象。</para>
            /// </summary>
            [Description("Exclude source classes")]
            [GPEnumValue("EXCLUDE_SOURCE_CLASSES")]
            _EXCLUDE_SOURCE_CLASSES,

            /// <summary>
            /// <para>Include source classes</para>
            /// <para>Include source classes—Features and objects based on the specified network source classes and object tables will be removed. This is the default.</para>
            /// <para>包括源类 - 将移除基于指定网络源类和对象表的要素和对象。这是默认设置。</para>
            /// </summary>
            [Description("Include source classes")]
            [GPEnumValue("INCLUDE_SOURCE_CLASSES")]
            _INCLUDE_SOURCE_CLASSES,

        }

        /// <summary>
        /// <para>Network Sources</para>
        /// <para><xdoc>
        ///   <para>The network source class (or classes) and object table (or tables) that will be excluded or included depending on the rule process.</para>
        ///   <para>By default, Rule Process is set to Include source classes (inverse_source_selection = "INCLUDE_SOURCE_CLASSES" in Python), and one or more network source classes or object tables will be processed. All diagram features related to network features and objects that belong to those classes and object tables will be removed.</para>
        ///   <para>When specifying the SystemJunctions class among the network source classes, the rule will systematically process both system junctions and system junction objects.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>根据规则流程，将排除或包含的网络源类（或多个类）和对象表。</para>
        ///   <para>默认情况下，“规则进程”设置为“包括源类”（Python 中为 inverse_source_selection = “INCLUDE_SOURCE_CLASSES”），并且将处理一个或多个网络源类或对象表。将移除与网络要素和属于这些类和对象表的对象相关的所有逻辑示意图要素。</para>
        ///   <para>在网络源类中指定 SystemJunctions 类时，规则将系统地处理系统联结和系统联结对象。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Network Sources")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _network_source { get; set; }


        /// <summary>
        /// <para>Description</para>
        /// <para>The description of the rule.</para>
        /// <para>规则的说明。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Description")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _description { get; set; } = null;


        /// <summary>
        /// <para>Output Network</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Network")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_utility_network { get; set; }


        /// <summary>
        /// <para>Output Diagram Template</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Diagram Template")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_template_name { get; set; }


        public AddRemoveFeatureRule SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}